package thread;

/**
 * Created with IntelliJ IDEA.
 * Description: 工厂模式——构造方法的缺陷
 * User: 王圆豪
 * Date: 2025-05-04
 * Time: 23:11
 */
class Point {

}

class PointFactory{
    public static Point MakePointByXY(double x, double y) {
        Point point = new Point();
        //对Point对象进行属性设置
        return point;
    }

    public static Point MakePointByRA(double r, double a) {
        Point point = new Point();
        //对Point对象进行属性设置
        return point;
    }
}

public class Demo30 {
    public static void main(String[] args) {

    }
}
